#include <stdio.h>
#include "Progress.h"
#include <unistd.h>
#include <string.h>
#define style '#'
#define lenth 101

void ProcBar()
{
	char bar[lenth];
	memset(bar, '\0', sizeof(bar));
	const char* lable = "|/-\\";
	int len = strlen(lable);
	int cnt = 0;
	while (cnt <= 100)
	{
		printf("[%-100s][%3d%%][%c]\r", bar, cnt, lable[cnt%len]);
		fflush(stdout);
		bar[cnt++] = style;
		usleep(20000);
	}
	printf("\n");
	
}
